home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
dtype
/
mndtv394.lha
/
mandt
/
s
/
man
Wrap
AmigaDOS Script File
|
1994-11-30
|
1KB
|
65 lines
.key file/a,section
.bra {
.ket }
;
; $PROJECT: unix manual page CLI command using MultiView and man.datatype
;
; $VER: man 1.2 (19.11.94)
; by
;
; Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
;
; (C) Copyright 1994
; All Rights Reserved !
;
; $FUNCTION:
;
; This command searches for a given string and if it found a entry, it opens
; a MultiView window to display it (The man.datatype have to be installed) !
;
; Set the MANPATH environment variable to the root directory for the man pages.
;
;
; $HISTORY:
;
; 19.11.94 : 001.002 : now uses [0-9] pattern as suffix
; 18.11.94 : 001.001 : initial
;
; use this, if the mandb entries are relativ path's
set MPATH $MANPATH/
; use this, if the mandb entries are global path's
; set MPATH ""
if NOT EXISTS $MANPATH/mandb
search $MANPATH #?.[0-9] FILE ALL >$MANPATH/mandb
endif
if NOT EXISTS $MANPATH/mandb
Echo "Can't find man database !"
quit 5
endif
if NOT "{section}" EQ ""
search $MANPATH/mandb #?{section}/{file}.[0-9] PATTERN NONUM >ENV:MAN
if "$MAN" EQ ""
Echo "no manual entry in section {section} found !"
endif
else
search $MANPATH/mandb /{file}.[0-9] PATTERN NONUM >ENV:MAN
if "$MAN" EQ ""
Echo "no manual entry found !"
endif
endif
; if something is found , display it via MultiView
if NOT "$MAN" EQ ""
run >NIL: <NIL: multiview $MPATH$MAN PUBSCREEN `GetPubName`
endif
; cleanup
unsetenv MAN
unset MPATH